import service from '@/utils/request'

export const useSupplierApi = (id: Number) => {
	return service.get('/sys/supplier/' + id)
}

export const useSupplierSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sys/supplier', dataForm)
	} else {
		return service.post('/sys/supplier/save', dataForm)
	}
}

export const useSupplierListApi = (dataForm: any) => {
	return service.post('/sys/supplier/list', dataForm)
}
